<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>易渔</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link rel="icon" href="assets/logo/logo.png">
</head>
<body class="bg-gray-100 min-h-screen">
    <div id="particles-js" class="fixed inset-0 z-0"></div>
    
    <!-- 导航栏 -->
    <nav class="bg-gradient-to-r from-blue-700 to-blue-500 text-white shadow-lg relative z-10">
        <div class="container mx-auto px-4 py-3">
            <div class="flex flex-wrap justify-between items-center">
                <div class="flex items-center">
                    <!-- <i class="fas fa-fish text-2xl mr-3 animate-pulse"></i> -->
                     <img src="assets/logo/logo.png" alt="易渔" style="width: 30px;height: 40px;">
                    <a href="index.html" class="text-2xl font-bold">易渔</a>
                </div>
                <div class="hidden md:flex space-x-8 text-lg">
                    <a href="index.html" class="hover:text-blue-200 transition duration-300 border-b-2 border-white">首页</a>
                    <a href="forum.html" class="hover:text-blue-200 transition duration-300">论坛</a>
                    <a href="mall.html" class="hover:text-blue-200 transition duration-300">商城</a>
                    <a href="#" class="hover:text-blue-200 transition duration-300" id="communityBtn">社区活动</a>
                    <a href="#" class="hover:text-blue-200 transition duration-300" id="techniqueBtn">钓技研究</a>
                </div>
                <div class="flex items-center">
                    <a href="cart.html" class="mr-4 relative">
                        <i class="fas fa-shopping-cart text-xl"></i>
                        <span id="cart-count" class="absolute -top-2 -right-2 bg-red-500 text-white rounded-full h-5 w-5 flex items-center justify-center text-xs">0</span>
                    </a>
                    <div id="user-auth-section">
                        <a href="auth.html" class="bg-white text-blue-600 hover:bg-blue-100 px-4 py-2 rounded-lg font-medium transition duration-300">登录/注册</a>
                    </div>
                    <div id="user-info-section" class="hidden">
                        <div class="flex items-center">
                            <img id="user-avatar" src="https://picsum.photos/40/40" alt="用户头像" class="w-8 h-8 rounded-full mr-2">
                            <span id="username" class="font-medium"></span>
                            <button id="logout-btn" class="ml-3 text-sm text-blue-200 hover:text-white">退出</button>
                        </div>
                    </div>
                    <button id="mobile-menu-btn" class="md:hidden ml-4">
                        <i class="fas fa-bars text-2xl"></i>
                    </button>
                </div>
            </div>
            <!-- 移动端菜单 -->
            <div id="mobile-menu" class="hidden md:hidden w-full mt-3">
                <a href="index.html" class="block py-2 hover:bg-blue-600 px-2 rounded">首页</a>
                <a href="forum.html" class="block py-2 hover:bg-blue-600 px-2 rounded">论坛</a>
                <a href="mall.html" class="block py-2 hover:bg-blue-600 px-2 rounded">商城</a>
                <a href="#" class="block py-2 hover:bg-blue-600 px-2 rounded">社区活动</a>
                <a href="#" class="block py-2 hover:bg-blue-600 px-2 rounded">钓技研究</a>
            </div>
        </div>
    </nav>

    <!-- 首页横幅 -->
    <div class="relative h-80 flex items-center justify-center overflow-hidden">
        <!-- 轮播背景容器 -->
        <div id="slider-bg" class="absolute inset-0 bg-cover bg-center transition-opacity duration-1000">
            <!-- 背景图由JS动态切换 -->
        </div>
        <div class="absolute inset-0 bg-black bg-opacity-50 z-10"></div>
        <div class="relative z-20 text-center text-white px-4">
            <h1 class="text-4xl md:text-5xl font-bold mb-4">欢迎来到钓鱼天堂</h1>
            <p class="text-xl md:text-2xl mb-8">分享钓鱼技巧，交流钓鱼心得，购买专业钓具</p>
            <div class="flex flex-col md:flex-row justify-center space-y-4 md:space-y-0 md:space-x-4">
                <a href="forum.html" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-8 rounded-lg transition duration-300 transform hover:scale-105">
                    进入论坛
                </a>
                <a href="mall.html" class="bg-green-600 hover:bg-green-700 text-white font-bold py-3 px-8 rounded-lg transition duration-300 transform hover:scale-105">
                    浏览商城
                </a>
            </div>
        </div>
    </div>

    <!-- 内容区域 -->
    <div class="container mx-auto px-4 py-8">
        <!-- 功能区块 -->
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12">
            <div class="bg-white rounded-lg shadow-md p-6 hover:shadow-xl transition duration-300 transform hover:-translate-y-1">
                <div class="text-blue-500 mb-4">
                    <i class="fas fa-comments text-4xl"></i>
                </div>
                <h3 class="text-xl font-bold mb-2">热门讨论</h3>
                <p class="text-gray-600">与钓友们一起讨论最新的钓鱼技巧和经验</p>
                <a href="forum.html" class="mt-4 inline-block text-blue-600 hover:text-blue-800">查看更多 &rarr;</a>
            </div>
            <div class="bg-white rounded-lg shadow-md p-6 hover:shadow-xl transition duration-300 transform hover:-translate-y-1">
                <div class="text-green-500 mb-4">
                    <i class="fas fa-shopping-bag text-4xl"></i>
                </div>
                <h3 class="text-xl font-bold mb-2">钓具商城</h3>
                <p class="text-gray-600">选购高品质钓鱼装备，专业推荐和优惠价格</p>
                <a href="mall.html" class="mt-4 inline-block text-green-600 hover:text-green-800">立即购买 &rarr;</a>
            </div>
            <div class="bg-white rounded-lg shadow-md p-6 hover:shadow-xl transition duration-300 transform hover:-translate-y-1">
                <div class="text-yellow-500 mb-4">
                    <i class="fas fa-map-marked-alt text-4xl"></i>
                </div>
                <h3 class="text-xl font-bold mb-2">钓点地图</h3>
                <p class="text-gray-600">发现周围优质钓点，分享自己的秘密钓场</p>
                <a href="#" id="fishingMapBtn" class="mt-4 inline-block text-yellow-600 hover:text-yellow-800">查看地图 &rarr;</a>
            </div>
            <div class="bg-white rounded-lg shadow-md p-6 hover:shadow-xl transition duration-300 transform hover:-translate-y-1">
                <div class="text-purple-500 mb-4">
                    <i class="fas fa-calendar-alt text-4xl"></i>
                </div>
                <h3 class="text-xl font-bold mb-2">活动与比赛</h3>
                <p class="text-gray-600">参加线下钓鱼活动和竞赛，结交志同道合的朋友</p>
                <a href="#" id="eventsBtn" class="mt-4 inline-block text-purple-600 hover:text-purple-800">活动日历 &rarr;</a>
            </div>
        </div>

        <!-- 热门板块 -->
        <h2 class="text-2xl font-bold mb-6 text-gray-800">热门板块</h2>
        <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-12">
            <div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition duration-300">
                <img src="https://picsum.photos/400/200?freshwater" alt="淡水钓鱼" class="w-full h-48 object-cover">
                <div class="p-5">
                    <h3 class="text-xl font-bold mb-2">淡水钓鱼</h3>
                    <p class="text-gray-600 mb-4">关于河流、湖泊等淡水区域的钓鱼讨论</p>
                    <div class="flex justify-between items-center">
                        <span class="text-sm text-gray-500"><i class="fas fa-users mr-1"></i> 2.4k 成员</span>
                        <a href="forumInfo.html" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded transition duration-300">进入</a>
                    </div>
                </div>
            </div>
            <div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition duration-300">
                <img src="https://picsum.photos/400/200?sea" alt="海钓" class="w-full h-48 object-cover">
                <div class="p-5">
                    <h3 class="text-xl font-bold mb-2">海钓</h3>
                    <p class="text-gray-600 mb-4">海域钓鱼、船钓和岸钓的经验分享</p>
                    <div class="flex justify-between items-center">
                        <span class="text-sm text-gray-500"><i class="fas fa-users mr-1"></i> 1.8k 成员</span>
                        <a href="forumInfo.html?category=sea" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded transition duration-300">进入</a>
                    </div>
                </div>
            </div>
            <div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition duration-300">
                <img src="https://picsum.photos/400/200?equipment" alt="装备讨论" class="w-full h-48 object-cover">
                <div class="p-5">
                    <h3 class="text-xl font-bold mb-2">装备讨论</h3>
                    <p class="text-gray-600 mb-4">钓鱼装备的选购建议和使用心得</p>
                    <div class="flex justify-between items-center">
                        <span class="text-sm text-gray-500"><i class="fas fa-users mr-1"></i> 3.1k 成员</span>
                        <a href="forumInfo.html?category=equipment" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded transition duration-300">进入</a>
                    </div>
                </div>
            </div>
        </div>

        <!-- 热门商品 -->
        <h2 class="text-2xl font-bold mb-6 text-gray-800">热门商品</h2>
        <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-12">
            <div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition duration-300">
                <div class="relative">
                    <img src="https://picsum.photos/400/300?rod" alt="专业碳素鱼竿" class="w-full h-48 object-cover">
                    <span class="absolute top-2 right-2 bg-red-500 text-white text-xs font-bold px-2 py-1 rounded">热销</span>
                </div>
                <div class="p-4">
                    <h3 class="font-bold text-lg mb-1">专业碳素鱼竿</h3>
                    <p class="text-gray-500 text-sm mb-2">超轻超硬，适合各种钓鱼场景</p>
                    <div class="flex justify-between items-center">
                        <span class="text-red-600 font-bold">¥299.00</span>
                        <button class="add-to-cart bg-blue-500 hover:bg-blue-600 text-white px-3 py-1 rounded text-sm transition duration-300" data-id="1" data-name="专业碳素鱼竿" data-price="299" data-img="https://picsum.photos/400/300?rod">
                            加入购物车
                        </button>
                    </div>
                </div>
            </div>
            <div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition duration-300">
                <img src="https://picsum.photos/400/300?reel" alt="渔轮" class="w-full h-48 object-cover">
                <div class="p-4">
                    <h3 class="font-bold text-lg mb-1">金属轴承渔轮</h3>
                    <p class="text-gray-500 text-sm mb-2">高速比，轻松应对大鱼</p>
                    <div class="flex justify-between items-center">
                        <span class="text-red-600 font-bold">¥199.00</span>
                        <button class="add-to-cart bg-blue-500 hover:bg-blue-600 text-white px-3 py-1 rounded text-sm transition duration-300" data-id="2" data-name="金属轴承渔轮" data-price="199" data-img="https://picsum.photos/400/300?reel">
                            加入购物车
                        </button>
                    </div>
                </div>
            </div>
            <div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition duration-300">
                <img src="https://picsum.photos/400/300?bait" alt="仿生软饵" class="w-full h-48 object-cover">
                <div class="p-4">
                    <h3 class="font-bold text-lg mb-1">仿生软饵套装</h3>
                    <p class="text-gray-500 text-sm mb-2">30款多彩软饵，效果显著</p>
                    <div class="flex justify-between items-center">
                        <span class="text-red-600 font-bold">¥89.00</span>
                        <button class="add-to-cart bg-blue-500 hover:bg-blue-600 text-white px-3 py-1 rounded text-sm transition duration-300" data-id="3" data-name="仿生软饵套装" data-price="89" data-img="https://picsum.photos/400/300?bait">
                            加入购物车
                        </button>
                    </div>
                </div>
            </div>
            <div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition duration-300">
                <img src="https://picsum.photos/400/300?box" alt="多功能钓箱" class="w-full h-48 object-cover">
                <div class="p-4">
                    <h3 class="font-bold text-lg mb-1">多功能钓箱</h3>
                    <p class="text-gray-500 text-sm mb-2">大容量，防水设计</p>
                    <div class="flex justify-between items-center">
                        <span class="text-red-600 font-bold">¥359.00</span>
                        <button class="add-to-cart bg-blue-500 hover:bg-blue-600 text-white px-3 py-1 rounded text-sm transition duration-300" data-id="4" data-name="多功能钓箱" data-price="359" data-img="https://picsum.photos/400/300?box">
                            加入购物车
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <!-- 最新帖子 -->
        <h2 class="text-2xl font-bold mb-6 text-gray-800">最新帖子</h2>
        <div class="bg-white rounded-lg shadow-md p-6 mb-12">
            <div id="latest-posts" class="space-y-4">
                <!-- 帖子将由JavaScript动态生成 -->
            </div>
            <div class="text-center mt-6">
                <a href="forum.html" class="inline-block bg-blue-500 hover:bg-blue-600 text-white px-6 py-2 rounded-lg transition duration-300">查看更多帖子</a>
            </div>
        </div>
    </div>

    <!-- 通知弹窗 -->
    <div id="notification" class="fixed bottom-4 right-4 bg-green-500 text-white p-4 rounded-lg shadow-lg transform translate-y-20 opacity-0 transition-all duration-300 z-50 hidden">
        已添加商品到购物车
    </div>

    <!-- 功能开发中弹窗 -->
    <div id="development-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-lg p-8 max-w-md w-full">
            <div class="text-center">
                <i class="fas fa-code text-4xl text-blue-500 mb-4"></i>
                <h3 class="text-2xl font-bold mb-2">功能开发中</h3>
                <p class="text-gray-600 mb-6">该功能正在积极开发中，敬请期待！</p>
                <button id="close-dev-modal" class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-2 rounded transition duration-300">
                    了解
                </button>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer class="bg-gray-800 text-white py-8 mt-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <h4 class="text-lg font-bold mb-4">关于我们</h4>
                    <p class="text-gray-400">钓鱼天堂是一个致力于为钓鱼爱好者提供交流平台和专业装备的综合性网站。</p>
                </div>
                <div>
                    <h4 class="text-lg font-bold mb-4">快速链接</h4>
                    <ul class="space-y-2 text-gray-400">
                        <li><a href="index.html" class="hover:text-white transition">首页</a></li>
                        <li><a href="forum.html" class="hover:text-white transition">论坛</a></li>
                        <li><a href="mall.html" class="hover:text-white transition">商城</a></li>
                        <li><a href="auth.html" class="hover:text-white transition">注册/登录</a></li>
                    </ul>
                </div>
                <div>
                    <h4 class="text-lg font-bold mb-4">联系我们</h4>
                    <ul class="space-y-2 text-gray-400">
                        <li><i class="fas fa-envelope mr-2"></i> contact@fishingheaven.com</li>
                        <li><i class="fas fa-phone mr-2"></i> 400-123-4567</li>
                        <li><i class="fas fa-map-marker-alt mr-2"></i> 渔乐路88号钓鱼天堂大厦</li>
                    </ul>
                </div>
                <div>
                    <h4 class="text-lg font-bold mb-4">关注我们</h4>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i class="fab fa-weixin"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i class="fab fa-weibo"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i class="fab fa-qq"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i class="fab fa-tiktok"></i></a>
                    </div>
                    <div class="mt-4">
                        <p class="text-gray-400">订阅我们的钓鱼情报</p>
                        <div class="flex mt-2">
                            <input type="email" placeholder="您的邮箱" class="px-3 py-2 text-gray-800 rounded-l focus:outline-none w-full">
                            <button class="bg-blue-500 hover:bg-blue-600 px-4 py-2 rounded-r transition">订阅</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="border-t border-gray-700 mt-8 pt-6 text-center text-gray-400">
                <p>&copy; 2025 钓鱼天堂 版权所有 | 钓友们的网上家园</p>
            </div>
        </div>
    </footer>

    <!-- 粒子效果 -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/particles.js/2.0.0/particles.min.js"></script>
    <script src="js/app.js"></script>
    <script src="js/mall.js"></script>
    <script src="js/forum.js"></script>
    <script type="module" src="./js/childJS/indexChild.js"></script>
</body>
</html>
